package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HaConsultingroomMapper;
import com.ruoyi.system.domain.HaConsultingroom;
import com.ruoyi.system.service.IHaConsultingroomService;

/**
 * 诊室列表Service业务层处理
 * 
 * @author 鲍小伟
 * @date 2025-11-11
 */
@Service
public class HaConsultingroomServiceImpl implements IHaConsultingroomService 
{
    @Autowired
    private HaConsultingroomMapper haConsultingroomMapper;

    /**
     * 查询诊室列表
     * 
     * @param cid 诊室列表主键
     * @return 诊室列表
     */
    @Override
    public HaConsultingroom selectHaConsultingroomByCid(Long cid)
    {
        return haConsultingroomMapper.selectHaConsultingroomByCid(cid);
    }

    /**
     * 查询诊室列表列表
     * 
     * @param haConsultingroom 诊室列表
     * @return 诊室列表
     */
    @Override
    public List<HaConsultingroom> selectHaConsultingroomList(HaConsultingroom haConsultingroom)
    {
        return haConsultingroomMapper.selectHaConsultingroomList(haConsultingroom);
    }

    /**
     * 新增诊室列表
     * 
     * @param haConsultingroom 诊室列表
     * @return 结果
     */
    @Override
    public int insertHaConsultingroom(HaConsultingroom haConsultingroom)
    {
        haConsultingroom.setCreateTime(DateUtils.getNowDate());
        return haConsultingroomMapper.insertHaConsultingroom(haConsultingroom);
    }

    /**
     * 修改诊室列表
     * 
     * @param haConsultingroom 诊室列表
     * @return 结果
     */
    @Override
    public int updateHaConsultingroom(HaConsultingroom haConsultingroom)
    {
        haConsultingroom.setUpdateTime(DateUtils.getNowDate());
        return haConsultingroomMapper.updateHaConsultingroom(haConsultingroom);
    }

    /**
     * 批量删除诊室列表
     * 
     * @param cids 需要删除的诊室列表主键
     * @return 结果
     */
    @Override
    public int deleteHaConsultingroomByCids(Long[] cids)
    {
        return haConsultingroomMapper.deleteHaConsultingroomByCids(cids);
    }

    /**
     * 删除诊室列表信息
     * 
     * @param cid 诊室列表主键
     * @return 结果
     */
    @Override
    public int deleteHaConsultingroomByCid(Long cid)
    {
        return haConsultingroomMapper.deleteHaConsultingroomByCid(cid);
    }
}
